import Vue from 'vue'
import Router from 'vue-router'
import App from '@/App.vue'
import Home from '@/views/Home/home.vue'
const overview = () => import('@/views/Home/overview.vue')
const status = () => import('@/views/Home/status.vue')
const thirty = () => import('@/views/Home/thirty.vue')
// const house = () => import('@/views/Home/house.vue')
const waterThirty = () => import('@/views/Home/waterThirty.vue')
const monitor = () => import('@/views/Home/monitor.vue')
const consumption = () => import('@/views/Home/consumption.vue')
// import Auto from './auto'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home',
      component: App,
      children: [
        {
          path: '/home', // 主页面 泵房总览
          components: { default: Home },
          meta: { title: '首页', fullPath: 'home.vue' },
        },
        {
          path: '/overview',
          components: { default: overview },
          meta: { title: '土桥村水厂', fullPath: 'overview.vue' },
        },
        {
          path: '/status',
          components: { default: status },
          meta: { title: '设备状态', fullPath: 'status.vue' },
        },
        {
          path: '/thirty',
          components: { default: thirty },
          meta: { title: '近30条报警情况', fullPath: 'thirty.vue' },
        },
        // {
        //   path: '/house',
        //   components: { default: house },
        //   meta: { title: '能耗对比 ', fullPath: 'house.vue' },
        // },
        {
          path: '/waterThirty',
          components: { default: waterThirty },
          meta: { title: '近30天光伏能耗总览', fullPath: 'waterThirty.vue' },
        },
        {
          path: '/monitor',
          components: { default: monitor },
          meta: { title: '发电情况', fullPath: 'monitor.vue' },
        },
        {
          path: '/consumption',
          components: { default: consumption },
          meta: { title: '今日实时功率', fullPath: 'consumption.vue' },
        }
      ],
    },
  ],
})
